home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / f90 / pxfsetenv.z / pxfsetenv
Encoding:
Text File  |  1998-10-30  |  4.6 KB  |  101 lines

  1. PXFSETENV(3F)                                          Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      PPXXFFSSEETTEENNVV - Sets environment variable pair
  6.  
  7. SSYYNNOOPPSSIISS
  8.      CCHHAARRAACCTTEERR*_n _n_a_m_e,, _n_e_w
  9.      IINNTTEEGGEERR _l_e_n,, _n_a_m_e,, _l_e_n_n_e_w,, _i_o_v_e_r_w_r_i_t_e,, _i_e_r_r_o_r
  10.      CCAALLLL PPXXFFSSEETTEENNVV ((_n_a_m_e,, _l_e_n_n_a_m_e,, _n_e_w,, _l_e_n_n_e_w,, _i_o_v_e_r_w_r_i_t_e,, _i_e_r_r_o_r))
  11.  
  12. IIMMPPLLEEMMEENNTTAATTIIOONN
  13.      UNICOS, UNICOS/mk, and IRIX systems
  14.  
  15. SSTTAANNDDAARRDDSS
  16.      IEEE standard interface for FORTRAN 77
  17.  
  18. DDEESSCCRRIIPPTTIIOONN
  19.      On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
  20.      default when compiling programs with the MIPSpro 7 Fortran 90 compiler
  21.      or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
  22.      7.2 F77 compiler.
  23.  
  24.      The PPXXFFSSEETTEENNVV routine uses the ppuutteennvv((33CC)) function to change a
  25.      currently existing "name=value" pair or create a new name=value pair.
  26.      The _n_a_m_e or _n_e_w arguments are stripped of trailing blanks if _l_e_n_n_a_m_e
  27.      or _l_e_n_n_e_w are zero.
  28.  
  29.      When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
  30.      UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
  31.      kind unless documented otherwise.  On UNICOS and UNICOS/mk, default
  32.      kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
  33.      IRIX, the default kind is KKIINNDD==44.
  34.  
  35.      The following is a list of valid arguments for this routine:
  36.  
  37.      _n_a_m_e      An input character variable or array element containing the
  38.                environment name value to be set.
  39.  
  40.      _l_e_n_n_a_m_e   An input integer variable containing the character length of
  41.                _n_a_m_e. If _l_e_n_n_a_m_e is zero, trailing blanks are removed.
  42.  
  43.      _n_e_w       An input character variable or array element containing the
  44.                new environment value for the name=value environment pair.
  45.  
  46.      _l_e_n_n_e_w    An input integer variable containing the character length of
  47.                _n_e_w. If _l_e_n_n_e_w is zero, trailing blanks are removed.
  48.  
  49.      _i_o_v_e_r_w_r_i_t_e
  50.                An input integer variable containing a zero or nonzero
  51.                number. When the value is zero, a name=value pair with the
  52.                name value matching _n_a_m_e will not be replaced with a new
  53.                name=_n_e_w pair.
  54.  
  55.                A nonzero _i_o_v_e_r_w_r_i_t_e value will replace the matching
  56.                name=value pair with name=_n_e_w pair.
  57.  
  58.      _i_e_r_r_o_r    An output integer variable that contains zero if the
  59.                environment variable was changed or nonzero if PPXXFFSSEETTEENNVV was
  60.                not successful.
  61.  
  62.      The PPXXFFSSEETTEENNVV routine may return any of the following error values:
  63.  
  64.      EEIINNVVAALL    If _i_l_e_n is less than 0 or _l_e_n_n_a_m_e is greater than LLEENN((_p_a_t_h))
  65.                or _l_e_n_n_e_w is less than 0 or _l_e_n_n_e_w is greater than LLEENN((_n_e_w)).
  66.  
  67.      EENNOOMMEEMM    If PPXXFFSSEETTEENNVV is unable to obtain memory to copy _n_a_m_e and _n_e_w
  68.                to a new name=value string.
  69.  
  70. EEXXAAMMPPLLEESS
  71.      In this example, PPXXFFSSEETTEENNVV sets the SSHHEELLLL environment value to
  72.      //bbiinn//ccsshh.
  73.  
  74.                  program testpxf
  75.                  character*10 name, val
  76.                  integer lenname, lenval, ioverw, ierr
  77.           c set input arguments
  78.                  name='SHELL'
  79.                  ierr=0
  80.                  lenname=5
  81.                  val='/bin/csh'
  82.                  lenval=8
  83.                  ioverw=1
  84.                  CALL PXFSETENV(name,lenname,val,lenval,iover,ierr)
  85.           c print input arguments
  86.                  print *,'name=-',name,'-'
  87.                  print *,'lenname=',lenname
  88.                  print *,'val=-',val,'-'
  89.                  print *,'lenval=',lenval
  90.                  print *,'iotherw=',iotherw
  91.           c print output argument
  92.                  print *,'ierr=',ierr
  93.                  end
  94.  
  95. SSEEEE AALLSSOO
  96.      sseetteennvv(3C)
  97.  
  98.      _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-
  99.      2165, for the printed version of this man page.
  100.  
  101.